#include "modelvalidatorview.h"

#include "../utils/modelvalidator.h"

#include <QtGui/QHeaderView>
#include <QtGui/QStandardItemModel>

using namespace swp;

ModelValidatorView::ModelValidatorView(QWidget *parent) : QTreeView(parent)
{
    header()->hide();

    setEditTriggers(QAbstractItemView::DoubleClicked);
    setExpandsOnDoubleClick(false);
    setModel(ModelValidator::getInstance()->report());

    connect(this, SIGNAL(doubleClicked(QModelIndex)),
        ModelValidator::getInstance(),
        SLOT(handleReportItemActivation(QModelIndex)));
}

ModelValidatorView::~ModelValidatorView()
{

}
